import * as echarts from 'echarts'
import left1 from '@/images/soil/weather.png'
import left2 from '@/images/soil/wind.png'
import left3 from '@/images/soil/wet.png'
import left4 from '@/images/soil/rain.png'
import left5 from '@/images/soil/arrow.png'
import right1 from '@/images/soil/city.png'
import right2 from '@/images/soil/road.png'
import right3 from '@/images/soil/home.png'
import right4 from '@/images/soil/gald.png'
import leftcenter1 from '@/images/ai/leftcenter1.png'
import leftcenter2 from '@/images/ai/leftcenter2.png'
import leftcenter3 from '@/images/ai/leftcenter3.png'
import leftcenter4 from '@/images/ai/leftcenter4.png'
import leftcenter5 from '@/images/ai/leftcenter5.png'
import leftcenter6 from '@/images/ai/leftcenter6.png'
import center1 from '@/images/ai/center1.png'
import center2 from '@/images/ai/center2.png'
import center3 from '@/images/ai/center3.png'
import center4 from '@/images/ai/center4.png'
import center5 from '@/images/ai/center5.png'
import center6 from '@/images/ai/center6.png'
export const leftTopData = [
    { icon: left1, name: '实时温度', num: '25°C' },
    { icon: left2, name: '风速', num: '10m/s' },
    { icon: left3, name: '当前湿度', num: '57%' },
    { icon: left4, name: '降水', num: '0' },
    { icon: left5, name: '风向', num: '东南' },
]
export const leftCenter = [
    { icon: leftcenter1, name: '园区面积', num: '60', unit: "亩" },
    { icon: leftcenter2, name: '玻璃温室', num: '60', unit: "个" },
    { icon: leftcenter3, name: '育苗大棚', num: '60', unit: "亩" },
    { icon: leftcenter4, name: '种植大棚', num: '60', unit: "亩" },
    { icon: leftcenter5, name: '种植作物', num: '60', unit: "种" },
    { icon: leftcenter6, name: '种植大棚', num: '60', unit: "种" },
];
export const leftBottomLeft =
{
    backgroundColor: 'transparent',
    title: {
        text: 'PH',
        textStyle: {
            fontSize: 14,
            color: '#fff',
        },
        x: '40%',
        y: '60%'
    },
    series: [
        {
            type: 'liquidFill',
            radius: '80%',
            center: ['50%', '50%'],
            color: [
                {
                    type: 'linear',
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [
                        {
                            offset: 0,
                            color: '#446bf5',
                        },
                        {
                            offset: 1,
                            color: '#2ca3e2',
                        },
                    ],
                    globalCoord: false,
                },
            ],
            data: [0.62, 0.52], // data个数代表波浪数
            backgroundStyle: {
                borderWidth: 1,
                color: 'RGBA(51, 66, 127, 0.7)',
            },
            label: {
                normal: {
                    textStyle: {
                        fontSize: 40,
                        color: '#fff',
                    },
                },
            },
            outline: {
                // show: false
                borderDistance: 0,
                itemStyle: {
                    borderWidth: 2,
                    borderColor: '#112165',
                },
            },
        },


    ],
};


export const leftBottomRight = {

}
export const rightCenterData = [
    { label: '当前灌溉面积', value: '60亩' },
    { label: '当前流量', value: '90m3/h' },
    { label: '当前管道压力', value: '3bar' },
    { label: '设备功率', value: '22kw' },
    { label: '当前轮罐组', value: '第一组、第二组、第三组' },
    { label: '灌溉作物', value: '茄子、番茄、葡萄' },
]
export const rightBottomData = {
    backgroundColor: 'transparent',
    title: {
        show: false,
        text: '哎呦,不错哦',
        textStyle: {
            align: 'center',
            color: '#fff',
            fontSize: 20,
        },
        top: '5%',
        left: 'center',
    },
    tooltip: {
        trigger: 'axis',
        axisPointer: {
            lineStyle: {
                color: {
                    type: 'linear',
                    x: 0,
                    y: 0,
                    x2: 0,
                    y2: 1,
                    colorStops: [{
                        offset: 0,
                        color: 'rgba(0, 255, 233,0)'
                    }, {
                        offset: 0.5,
                        color: 'rgba(255, 255, 255,1)',
                    }, {
                        offset: 1,
                        color: 'rgba(0, 255, 233,0)'
                    }],
                    global: false
                }
            },
        },
    },
    grid: {
        top: '5%',
        left: '0%',
        right: '5%',
        bottom: '15%',
        containLabel: true
    },
 
    xAxis: [{
        show: false,
        type: 'category',
        axisLine: {
            show: false
        },
        splitArea: {
            show: false,
            color: '#f00',
            lineStyle: {
                color: '#f00'
            },
        },
        axisTick: {
            show: false
        },
        axisLabel: {
            color: '#fff',
            show: true,
            inside: true
        },
        splitLine: {
            show: false
        },
        boundaryGap: false,
        data: ['2013', '2014', '2015', '2016', '2017', '2018', '2019', '2020', '2021', '2022', '2023'],

    }],

    yAxis: [{
        type: 'value',
        min: 1000,
        max: 8000
    }],
    series: [{
        name: '玉米',
        type: 'line',
        // smooth: true, //是否平滑
        symbolSize: 0,
        lineStyle: {
            normal: {
                color: "#6c50f3",
                shadowColor: 'rgba(0, 0, 0, .3)',
                shadowBlur: 0,
                shadowOffsetY: 5,
                shadowOffsetX: 5,
            },
        },
        label: {
            show: false,
            position: 'top',
            textStyle: {
                color: '#6c50f3',
            }
        },
        itemStyle: {
            color: "#6c50f3",
            borderColor: "#fff",
            borderWidth: 3,
            shadowColor: 'rgba(0, 0, 0, .3)',
            shadowBlur: 0,
            shadowOffsetY: 2,
            shadowOffsetX: 2,
        },

        areaStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                    offset: 0,
                    color: 'rgba(108,80,243,1)'
                },
                {
                    offset: 1,
                    color: 'rgba(108,80,243,0)'
                }
                ], false),
                // shadowColor: 'rgba(108,80,243, 0.9)',
                // shadowBlur: 20
            }
        },
        data: [7000, 6800, 5900, 7200, 4712, 6612, 7000, 6800, 5900, 7200, 4712, 6612]
    },
    {
        name: '水稻',
        type: 'line',
        // smooth: true, //是否平滑
        showAllSymbol: true,
        // symbol: 'image://./static/images/guang-circle.png',
        symbol: 'circle',
        symbolSize: 0,
        lineStyle: {
            normal: {
                color: "#00ca95",
                shadowColor: 'rgba(0, 0, 0, .3)',
                shadowBlur: 0,
                shadowOffsetY: 5,
                shadowOffsetX: 5,
            },
        },
        label: {
            show: false,
            position: 'top',
            textStyle: {
                color: '#00ca95',
            }
        },

        itemStyle: {
            color: "#00ca95",
            borderColor: "#fff",
            borderWidth: 3,
            shadowColor: 'rgba(0, 0, 0, .3)',
            shadowBlur: 0,
            shadowOffsetY: 2,
            shadowOffsetX: 2,
        },

        areaStyle: {
            normal: {
                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
                    offset: 0,
                    color: 'rgba(0,202,149,1)'
                },
                {
                    offset: 1,
                    color: 'rgba(0,202,149,0)'
                }
                ], false),
                // shadowColor: 'rgba(0,202,149, 0.9)',
                // shadowBlur: 20
            }
        },
        data: [7200, 7800, 6600, 3200, 6712, 7612, 7200, 7800, 6600, 3200, 6712, 7612],
    },
    ]
};
export const centerData = [
    { icon: center1, name: '遮阳帘', num: '正常' },
    { icon: center2, name: '天窗', num: '正常' },
    { icon: center3, name: '风机', num: '正常' },
    { icon: center4, name: '风机', num: '正常' },
    { icon: center5, name: '传感器', num: '正常' },
    { icon: center5, name: '监控', num: '正常' },
]